<?php
namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\Relations\CommonTrait;
use App\Models\Relations\CompanyInfoTrait;
use App\Models\Relations\UserInfoTrait;
use Illuminate\Database\Eloquent\Model;
/**
 *
 * @author Joker
 *  company_id int(11) NOT NULL COMMENT '公司编号',
	resume_id	int(11) NOT NULL COMMENT '简历编号',
	user_id int(11) NOT NULL COMMENT '用户编号',
	content text NOT NULL COMMENT '评论内容',
	`level` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '评论星级：1：好评；2:中评；3:差评',
	from_company TINYINT(1) NOT NULL DEFAULT 0 COMMENT '来自企业，0：否；1：是',  
	created_at TIMESTAMP DEFAULT TIMESTAMP,
	updated_at TIMESTAMP DEFAULT TIMESTAMP,
	deleted_at TIMESTAMP DEFAULT TIMESTAMP,     
 */
class ResumeComment extends Model
{
    use SoftDeletes,CommonTrait,CompanyInfoTrait,UserInfoTrait;
    
    protected $table='resume_comment';
    
    protected $primaryKey = 'id';
    
    protected $fillable = ['id','company_id','resume_id','user_id', 'content', 'level','exam_level', 'from_company'];
    
    protected $dates = ['deleted_at'];
    
    public function resume()
    {
        return $this->hasOne('App\Models\CompanyInbox','id','resume_id');
    }
    
}